package stage_1_module_2.code.homework_3;

/**
 * 手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 
 * 行为：显示（卡号 + 用户名 + 当前余额）
 */
public class Card {
    private CardEnum type;
    private String num;
    private String name;
    private String pass;
    private int balance;
    private int callAmount;
    private int netAmount;

    public void setType(CardEnum ce) {
        this.type = ce;
    }

    public CardEnum getType() {
        return this.type;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getNum() {
        return this.num;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getPass() {
        return this.pass;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public int getBalance() {
        return this.balance;
    }

    public void display() {
        System.out.printf("卡号:%s,用户名:%s,余额:%d\n",num,name,balance);
    }
}
